import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  // 首页横向柱状图,根据数据算出长度比例
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  // 首页横向柱状图,根据数据算出长度比例
  {
    path: '/aboutTwo',
    name: 'aboutTwo',
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutViewTwo.vue')
  },
  //根据数据加载进度条
  {
    path: '/progress',
    name: 'progress',
    component: () => import('../views/progress.vue')
  },
  //编辑-自定义table样式,动态每行展示三个
  {
    path: '/descriptions',
    name: 'descriptions',
    component: () => import('../views/descriptions.vue')
  },
  //气泡框
  {
    path: '/bubble',
    name: 'bubble',
    component: () => import('../views/bubble.vue')
  },
  //大屏父子传参 ref获取子页面函数进行传参,props传值
  {
    path: '/dpIndex',
    name: 'dpIndex',
    component: () => import('../views/homeDp/index.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
